home *** CD-ROM | disk | FTP | other *** search
Wrap
aaaauuuuttttooooffffssss((((1111MMMM)))) aaaauuuuttttooooffffssss((((1111MMMM)))) NNNNAAAAMMMMEEEE autofs - install automatic mount points SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ////uuuussssrrrr////eeeettttcccc////aaaauuuuttttooooffffssss [ ----vvvv ] [ ----tttt _d_u_r_a_t_i_o_n ] [ ----rrrr ] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN aaaauuuuttttooooffffssss is a command that installs AAAAuuuuttttooooFFFFSSSS mount points and associates an AAAAuuuuttttooooFFFFSSSS map with each mount point. The AAAAuuuuttttooooFFFFSSSS filesystem monitors attempts to access directories within it and notifies the aaaauuuuttttooooffffssssdddd(1M) daemon. The daemon uses the map to locate a filesystem, which it then mounts at the point of reference within the AAAAuuuuttttooooFFFFSSSS filesystem. If the filesystem is not accessed within an appropriate interval (five minutes by default), the aaaauuuuttttooooffffssssdddd daemon unmounts the filesystem. AAAAuuuuttttooooFFFFSSSS is started by the /_e_t_c/_i_n_i_t._d/_n_e_t_w_o_r_k script, if the configuration flags ``nfs'' and ``autofs'' are set ``on'' at system initialization. (See autofsd(1M).) The script starts the aaaauuuuttttooooffffssssdddd daemon and invokes the aaaauuuuttttooooffffssss command. The aaaauuuuttttooooffffssss command consults the master map, a local file named ////eeeettttcccc////aaaauuuuttttoooo____mmmmaaaasssstttteeeerrrr, for a list of AAAAuuuuttttooooFFFFSSSS mount points and their maps. The master map contains the locations of all AAAAuuuuttttooooFFFFSSSS mount points. By default, /_e_t_c/_a_u_t_o__m_a_s_t_e_r contains an entry for the ----hhhhoooossssttttssss map: ////hhhhoooossssttttssss ----hhhhoooossssttttssss ----nnnnoooossssuuuuiiiidddd Each entry in the master file specifies a directory on which an AAAAuuuuttttooooFFFFSSSS mount will be made followed by the AAAAuuuuttttooooFFFFSSSS map to be associated with that mount point. Mount options may be supplied as an optional third field in each entry. These options are used for any entries in the map that do not specify mount options explicitly. AAAAuuuuttttooooFFFFSSSS maps can be eeeexxxxeeeeccccuuuuttttaaaabbbblllleeee binary or script files too. Any AutoFS map pointing to a file with execute permission set may be considered an executable map file which the autofs daemon will attempt to execute at mount time. The output (on stdout) of this executable map file is used as part of the AutoFS map. Look at the ----EEEE option in the aaaauuuuttttooooffffssssdddd man page for more information on executable maps. The aaaauuuuttttooooffffssss command is usually run without arguments. It compares the entries in /_e_t_c/_a_u_t_o__m_a_s_t_e_r with the current list of AAAAuuuuttttooooFFFFSSSS mounts in /_e_t_c/_m_t_a_b and adds, removes or updates AAAAuuuuttttooooFFFFSSSS mounts to bring the /_e_t_c/_m_t_a_b up to date with /_e_t_c/_a_u_t_o__m_a_s_t_e_r. At boot time the aaaauuuuttttooooffffssss command installs all AAAAuuuuttttooooFFFFSSSS mounts from the master map. Subsequently, it may be run to install AAAAuuuuttttooooFFFFSSSS mounts for new entries in the master map, or to perform unmounts for entries that have been removed. OOOOPPPPTTTTIIIIOOOONNNNSSSS ----tttt _d_u_r_a_t_i_o_n Specify a _d_u_r_a_t_i_o_n, in seconds, that a filesystem is to remain mounted when not in use. The default is 300 (5 minutes). PPPPaaaaggggeeee 1111 aaaauuuuttttooooffffssss((((1111MMMM)))) aaaauuuuttttooooffffssss((((1111MMMM)))) ----vvvv Verbose mode. Notify of AAAAuuuuttttooooFFFFSSSS mounts, unmounts or other non- essential information. ----rrrr Remount mode. Force remounting for all existing AAAAuuuuttttooooFFFFSSSS mount points. Without this key aaaauuuuttttooooffffssss remounts only mount points which options were changed in /_e_t_c/_a_u_t_o__m_a_s_t_e_r file. Combination of ----rrrr and ----tttt keys can be used to change unmount timeout for existing AAAAuuuuttttooooFFFFSSSS mount points. UUUUSSSSAAAAGGGGEEEE MMMMaaaapppp EEEEnnnnttttrrrryyyy FFFFoooorrrrmmmmaaaatttt The format for master map entries was discussed above. Entries in other map files take the form: key [ -mount-options ] _l_o_c_a_t_i_o_n ... where _k_e_y is the full pathname of the directory to mount when used in a direct map, or the simple name of a subdirectory in an indirect map. _m_o_u_n_t-_o_p_t_i_o_n_s is a comma-separated list of mount options, and _l_o_c_a_t_i_o_n specifies a filesystem from which the directory may be mounted. In the case of a simple NFS mount, _l_o_c_a_t_i_o_n takes the form: _h_o_s_t_n_a_m_e:_p_a_t_h_n_a_m_e _h_o_s_t_n_a_m_e is the name of the host from which to mount the filesystem (it may be omitted if the pathname refers to a local device on which the filesystem resides) and _p_a_t_h_n_a_m_e is the pathname of the directory to mount. So, /etc/auto_master might contain an entry such as: /src /etc/auto_src -nosuid where /etc/auto_src contains: new awesome:/latest/src old -ro cave:/archive Accessing /src/{new,old} would result in a mount of the corresponding remote filesystem. RRRReeeepppplllliiiiccccaaaatttteeeedddd FFFFiiiilllleeeessssyyyysssstttteeeemmmmssss Multiple _l_o_c_a_t_i_o_n fields can be specified for replicated NFS filesystems, in which case aaaauuuuttttooooffffssss chooses the server that responds first. If each _l_o_c_a_t_i_o_n in the list shares the same _p_a_t_h_n_a_m_e then a single _l_o_c_a_t_i_o_n may be used with a comma-separated list of hostnames: _h_o_s_t_n_a_m_e_1,_h_o_s_t_n_a_m_e_2...:_p_a_t_h_n_a_m_e A mapping can be continued across input lines by escaping the NEWLINE with a `\' (backslash). Comments begin with a '#' (pound sign) and end at the subsequent NEWLINE. PPPPaaaaggggeeee 2222 aaaauuuuttttooooffffssss((((1111MMMM)))) aaaauuuuttttooooffffssss((((1111MMMM)))) MMMMaaaapppp KKKKeeeeyyyy SSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn"""" The '&' (ampersand) character is expanded to the value of the _k_e_y field for the entry in which it occurs. In this case: whozi onyxserver:/home/& the & expands to _w_h_o_z_i. _W_i_l_d_c_a_r_d _K_e_y The '*' (asterisk) character, when supplied as the _k_e_y field, is recognized as the catch-all entry. Such an entry will match any key not previously matched. For instance, if the following entry appeared in the indirect map for /_c_o_n_f_i_g: * &:/public/config/& this would allow automatic mounts in /_c_o_n_f_i_g of any remote filesystem whose location could be specified as: hostname:/public/config/hostname _V_a_r_i_a_b_l_e _S_u_b_s_t_i_t_u_t_i_o_n Client specific variables can be used within an AAAAuuuuttttooooFFFFSSSS map. For instance, if $_H_O_S_T appeared within a map, aaaauuuuttttooooffffssss would expand it to its current value for the client's host name. Supported variables are: ARCH The output of uname -m. The system's architecture. For example "IP19" CPU The output of uname -p. The processor type. For example "mips" HOST The output of uname -n. The host name. For example "ferd" OSNAME The output of uname -s. The OS name. For example "IRIX" OSREL The output of uname -r. The OS release name. For example "6.2" OSVERS The output of uname -v. The OS version. For example "10230951" If a reference needs to be protected from affixed characters, you can surround the variable name with '{}' (curly braces). _M_u_l_t_i_p_l_e _M_o_u_n_t_s A multiple mount entry takes the form: PPPPaaaaggggeeee 3333 aaaauuuuttttooooffffssss((((1111MMMM)))) aaaauuuuttttooooffffssss((((1111MMMM)))) key [ -mount-options ] [[_m_o_u_n_t_p_o_i_n_t] [-_m_o_u_n_t-_o_p_t_i_o_n_s] _l_o_c_a_t_i_o_n...]... The initial /[_m_o_u_n_t_p_o_i_n_t] is optional for the first mount and mandatory for all subsequent mounts. The optional _m_o_u_n_t_p_o_i_n_t is taken as a pathname relative to the directory named by _k_e_y. If _m_o_u_n_t_p_o_i_n_t is omitted in the first occurrence, a mountpoint of / (root) is implied. Given an entry in the indirect map for /src: beta -ro \ / svr1,svr2:/public/src/beta \ /1.0 svr1,svr2:/public/src/beta/1.0 \ /1.0/man svr1,svr2:/public/src/beta/1.0/man aaaauuuuttttooooffffssss would automatically mount /_s_r_c/_b_e_t_a, /_s_r_c/_b_e_t_a/_1._0, and /_s_r_c/_b_e_t_a/_1._0/_m_a_n, as needed, from either _s_v_r_1 or _s_v_r_2, whichever host responds first. OOOOtttthhhheeeerrrr FFFFiiiilllleeeessssyyyysssstttteeeemmmm TTTTyyyyppppeeeessss AAAAuuuuttttooooFFFFSSSS assumes NFS Version 3 mounts as the default filesystem type. Should the server not support NFS V3, AAAAuuuuttttooooFFFFSSSS will retry the mount(s) using the NFS V2 filesystem type. Users can select a particular version of the NFS protocol using the vvvveeeerrrrssss===={{{{2222,,,,3333}}}} mount option (see fstab(4)). Other filesystem types can be described using the ffffssssttttyyyyppppeeee mount option. Other mount options specific to this filesystem type can be combined with the _f_s_t_y_p_e option. The location field must contain information specific to the filesystem type. If the location field begins with a slash, a colon character must be prepended. Mounts using _C_a_c_h_e_F_S are most useful when applied to an entire map as map defaults. The following entry in the master map describes cached home directory mounts. It assumes the default location of the cache directory, /cache. /home auto_home -fstype=cachefs,backfstype=nfs The bbbbaaaacccckkkkffffssssttttyyyyppppeeee option is required for _C_a_c_h_e_F_S map entries. IIIInnnnddddiiiirrrreeeecccctttt MMMMaaaappppssss An indirect map allows you to specify mappings for the subdirectories you wish to mount under the _d_i_r_e_c_t_o_r_y chosen as the AAAAuuuuttttooooFFFFSSSS mount point. In an indirect map, each _k_e_y consists of a simple name (i.e., subdirectory) that refers to one or more filesystems that are to be mounted as needed. DDDDiiiirrrreeeecccctttt MMMMaaaappppssss Entries in a direct map are associated directly with AAAAuuuuttttooooFFFFSSSS mount points. Each _k_e_y is the full pathname of an AAAAuuuuttttooooFFFFSSSS mount point. The direct map as a whole is not associated with any single directory. PPPPaaaaggggeeee 4444 aaaauuuuttttooooffffssss((((1111MMMM)))) aaaauuuuttttooooffffssss((((1111MMMM)))) IIIInnnncccclllluuuuddddeeeedddd MMMMaaaappppssss The contents of another map can be included within a map with an entry of the form +_m_a_p_n_a_m_e , or by supplying _m_a_p_n_a_m_e (without the "+") in the location field of a map entry. If mapname begins with a slash then it is assumed to be the pathname of a local file. Otherwise the location of the map is determined by the policy of the name service switch according to the entry for the automounter in ////eeeettttcccc////nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff, such as automount(dynamic): files nis(nis_enumerate_key) ldap If the name service is ffffiiiilllleeeessss then the name is assumed to be that of a local file in ////eeeettttcccc. NNNNIIIISSSS requires the addition of the nnnniiiissss____eeeennnnuuuummmmeeeerrrraaaatttteeee____kkkkeeeeyyyy attribute; see nnnniiiissss((((7777PPPP)))). If the key being searched for is not found in the included map, the search continues with the next entry subject to control options. See nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff((((4444)))). The ddddyyyynnnnaaaammmmiiiicccc attribute is required to notify the Name Service Daemon (nsd) that the automount map allows dynamic map creation. See nnnnssssdddd((((1111MMMM)))). SSSSppppeeeecccciiiiaaaallll MMMMaaaappppssss There are two special maps available: ----hhhhoooossssttttssss and ----nnnnuuuullllllll. By default, the ----hhhhoooossssttttssss map is used with the ////hhhhoooossssttttssss directory. It assumes that the map key is the hostname of an NFS server. The aaaauuuuttttooooffffssssdddd daemon dynamically constructs a map entry from the server's list of exported filesystems. (See NOTES on ----nnnnoooohhhhiiiiddddeeee.) For instance a reference to /_h_o_s_t_s/_b_a_r_t/_u_s_r would initiate an automatic mount of all exported filesystems from _b_a_r_t that are mountable by the client. References to a directory under /_h_o_s_t_s/_b_a_r_t will refer to the corresponding directory relative to _b_a_r_t'_s root. The ----nnnnuuuullllllll map, when indicated in a map entry, cancels a previous map for the directory indicated. This is most useful in the /_e_t_c/_a_u_t_o__m_a_s_t_e_r file for cancelling entries that would otherwise be inherited from the NIS _a_u_t_o__m_a_s_t_e_r map, if included. To be effective, the ----nnnnuuuullllllll entries must be inserted before the included map entry. CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn aaaannnndddd tttthhhheeee aaaauuuuttttoooo....mmmmaaaasssstttteeeerrrr FFFFiiiilllleeee _a_u_t_o_f_s normally consults the /_e_t_c/_a_u_t_o__m_a_s_t_e_r configuration file for a list of initial autofs maps, and sets up automatic mounts for them. This behavior differs from automount in that _a_u_t_o_f_s does not take maps on the command line, nor does it look at the auto.master NIS map by default. Extra mappings (either NIS or file based) should be specified within the /_e_t_c/_a_u_t_o__m_a_s_t_e_r configuration file itself. To default to the automount behavior, for backward compatibility with old automount maps, the user should have one line in the /_e_t_c/_a_u_t_o__m_a_s_t_e_r configuration file, pointing to the NIS _a_u_t_o._m_a_s_t_e_r map of the form: +auto.master FFFFIIIILLLLEEEESSSS /etc/auto_master master AutoFS map. PPPPaaaaggggeeee 5555 aaaauuuuttttooooffffssss((((1111MMMM)))) aaaauuuuttttooooffffssss((((1111MMMM)))) /etc/config/autofs.options options and arguments for the aaaauuuuttttooooffffssss command and the aaaauuuuttttooooffffssssdddd daemon. SSSSEEEEEEEE AAAALLLLSSSSOOOO autofsd (1M), chkconfig (1M), exports (4), fstab (4), mount (1M), nsd(1M), nsswitch.conf (4) NNNNOOOOTTTTEEEESSSS The ----hhhhoooossssttttssss map mounts all of the exported NFS filesystems, for which the client has access, from a server. Use the _n_o_h_i_d_e export option on the server (see exports(4)) to minimize the number of mounts performed by clients. AutoFS will not request a separate mount for a _n_o_h_i_d_e filesystem, if the client has access via the parent filesystem. If frequent access to just a single filesystem is required, it is more efficient to access the filesystem with a map entry that is tailored to mount just the filesystem of interest. AAAAuuuuttttooooFFFFSSSS mount points must not be hierarchically related. aaaauuuuttttooooffffssss does not allow an AAAAuuuuttttooooFFFFSSSS mount point to be created within another AAAAuuuuttttooooFFFFSSSS mount. Since each direct map entry results in a new AAAAuuuuttttooooFFFFSSSS mount such maps should be kept short. If a directory contains direct map mount points then an `ls -l' in the directory will force all of the direct map mounts to occur. Entries in both direct and indirect maps can be modified at any time. The new information is used when aaaauuuuttttooooffffssssdddd next uses the map entry to do a mount. New entries added to a master map or direct map will not be useful until the aaaauuuuttttooooffffssss command is run to install them as new AAAAuuuuttttooooFFFFSSSS mount points. New entries added to an indirect map may be used immediately. An AAAAuuuuttttooooFFFFSSSS directory associated with an indirect map shows only currently-mounted entries. This is a deliberate policy to avoid inadvertent mounting of every entry in a map via an `ls -l' of the directory. The multiple location feature for NFS mounts allows the aaaauuuuttttooooffffssssdddd daemon to choose the most appropriate server at mount time. While such a mount is in effect, the daemon does not monitor the status of the server. If the server crashes, aaaauuuuttttooooffffssssdddd will not select an alternative server from the list. Default mount options can be assigned to an entire map when specified as an optional third field in the master map. These options apply only to map entries that have no mount options. PPPPaaaaggggeeee 6666 aaaauuuuttttooooffffssss((((1111MMMM)))) aaaauuuuttttooooffffssss((((1111MMMM)))) When using NSD to resolve map queries, Autofs actually creates map directories under the automount directory in ////nnnnssss////....llllooooccccaaaallll.... So, the NIS map aaaauuuuttttoooo____hhhhoooommmmeeee would be created as ////nnnnssss////....llllooooccccaaaallll////aaaauuuuttttoooommmmoooouuuunnnntttt////aaaauuuuttttoooo____hhhhoooommmmeeee CCCCAAAAVVVVEEEEAAAATTTT((((SSSS)))) It is important not to have the execute permission set on a standard text AAAAuuuuttttooooFFFFSSSS map, as this may cause autofs to attempt to execute the file assuming that the standard text map file is an executable AAAAuuuuttttooooFFFFSSSS map file. Look at the ----EEEE option in the aaaauuuuttttooooffffssssdddd man page for more information on executable maps. PPPPaaaaggggeeee 7777